//search_by_yourselves
//艺论坛搜索-全部
exports.search_by_yourselves = function(req,res) {

    //获取restful参数
    var restfulParams = req.routeInfo.restfulParams;

    //最终结果
    var resultData = {};

    //任务流创建
    async.waterfall([

        //获取活动列表
        function(cb){

            R.SEND_HTTP(
                req,
                {
                    url    : CORE_APIConfig.coreAPI.searchContentAndOrganization,
                    method : 'POST',
                    data   : {
                        fields : [].join(",")
                    }
                },
                function (err, data) {

                    //console.log(data);

                    resultData.contentData = data.data;

                    cb();
                }
            );
        },

        //时间处理
        function(cb){

            for(var i = 0 ;i<resultData.contentData.length;i++){

                //日期转化
                resultData.contentData[i].fa_start_time_value = common.getDateDiff(resultData.contentData[i].fa_start_time);

            }

            cb();

        }

    ],function(err, result){

        //返回最终拼接结果
        RES.response(res,true,resultData);

    });

}